/******************************************/
/******************************************/
/****  JS Document                     ****/
/****  by Andrew Mahon                 ****/
/****  amahon@gmail.com                ****/
/******************************************/
/******************************************/

(function(tc) {

	tc.jQ.fn.yeahyeahyeahyeahyeah = function(options){
		var $y5 = this, _o = {}, _components = {}
		
		_o = tc.jQ.extend({
			refreshTime:60000,
			refresh:false,
			cellblockId:'YEAH5'
		},options)
		
		function _initialize(){
			tc.util.log("YeahYeahYeahYeahYeah Starting",'info')
			tc.jQ.easing.def = "easeOutQuart"
			_components['fetcher'] = new tc.fn.y5fetcher(_o)
			_components['display'] = $y5.find('#display').y5display(_o)
			_components['infiniteScroll'] = new tc.fn.y5infinteScroll(_o)
			if(_o.refresh){
				tc.jQ.timer(_o.refreshTime,_checkForNewFrames)
			}
			return $y5
		}
		
		function _checkForNewFrames(){
			tc.events.trigger('checkForNew',{});
			tc.jQ.timer(_o.refreshTime,_checkForNewFrames)
		}
		
		return _initialize()
	}
})(tc);